/*------------------------------------------------------
                hou_elearningGEN beta v1.0
Author: xtrung.net@gmail.com
Write On: 04/27/2008
Create On:4/13/2012 11:22:45 AM
------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace hou_elearning.Entity
{
    public class LichhocEntity
    {
        public LichhocEntity()
        {
			m_pk_ilichhocid=0;
			m_fk_ikhoahoc_baihocid=0;
			m_fk_inguoitao=0;
			m_dngaytao=DateTime.Now;
			m_fk_inguoicapnhat=0;
			m_dngaycapnhat=DateTime.Now;
			m_dngayhoc=DateTime.Now;
			m_dgiobatdau=DateTime.Now;
			m_dgioketthuc=DateTime.Now;
			m_sghichu="";
			m_itrangthai=0;
        }
		private Int64 m_pk_ilichhocid;
		public Int64 PK_iLichhocID
		{
			get { return m_pk_ilichhocid ; }
			set { m_pk_ilichhocid = value; }
		}
		private Int64 m_fk_ikhoahoc_baihocid;
		public Int64 FK_iKhoahoc_BaihocID
		{
			get { return m_fk_ikhoahoc_baihocid ; }
			set { m_fk_ikhoahoc_baihocid = value; }
		}
		private Int64 m_fk_inguoitao;
		public Int64 FK_iNguoitao
		{
			get { return m_fk_inguoitao ; }
			set { m_fk_inguoitao = value; }
		}
		private DateTime m_dngaytao;
		public DateTime dNgaytao
		{
			get { return m_dngaytao ; }
			set { m_dngaytao = value; }
		}
		private Int64 m_fk_inguoicapnhat;
		public Int64 FK_iNguoicapnhat
		{
			get { return m_fk_inguoicapnhat ; }
			set { m_fk_inguoicapnhat = value; }
		}
		private DateTime m_dngaycapnhat;
		public DateTime dNgaycapnhat
		{
			get { return m_dngaycapnhat ; }
			set { m_dngaycapnhat = value; }
		}
		private DateTime m_dngayhoc;
		public DateTime dNgayhoc
		{
			get { return m_dngayhoc ; }
			set { m_dngayhoc = value; }
		}
		private DateTime m_dgiobatdau;
		public DateTime dGiobatdau
		{
			get { return m_dgiobatdau ; }
			set { m_dgiobatdau = value; }
		}
		private DateTime m_dgioketthuc;
		public DateTime dGioketthuc
		{
			get { return m_dgioketthuc ; }
			set { m_dgioketthuc = value; }
		}
		private String m_sghichu;
		public String sGhichu
		{
			get { return m_sghichu ; }
			set { m_sghichu = value; }
		}
		private Int16 m_itrangthai;
		public Int16 iTrangthai
		{
			get { return m_itrangthai ; }
			set { m_itrangthai = value; }
		}

        #region Comparison
        public static List<LichhocEntity> Sort(List<LichhocEntity> list, String SortExpression, String SortDirection)
        {
            string strComparisonAttrb="COMPARISON_"+SortExpression;
            PropertyInfo propInfo= typeof(LichhocEntity).GetProperty(strComparisonAttrb);
            if (propInfo != null)
            {
                list.Sort(propInfo.GetGetMethod().Invoke(null,null) as Comparison<LichhocEntity>);
                if (SortDirection == "DESC")
                    list.Reverse();
            }
            return list;
        }
        
		public static Comparison<LichhocEntity> COMPARISON_PK_iLichhocID
		{
			get
			{
				return delegate(LichhocEntity entity,LichhocEntity other)
				{
					return entity.PK_iLichhocID.CompareTo(other.PK_iLichhocID);
				};
			}
		}
		public static Comparison<LichhocEntity> COMPARISON_FK_iKhoahoc_BaihocID
		{
			get
			{
				return delegate(LichhocEntity entity,LichhocEntity other)
				{
					return entity.FK_iKhoahoc_BaihocID.CompareTo(other.FK_iKhoahoc_BaihocID);
				};
			}
		}
		public static Comparison<LichhocEntity> COMPARISON_FK_iNguoitao
		{
			get
			{
				return delegate(LichhocEntity entity,LichhocEntity other)
				{
					return entity.FK_iNguoitao.CompareTo(other.FK_iNguoitao);
				};
			}
		}
		public static Comparison<LichhocEntity> COMPARISON_dNgaytao
		{
			get
			{
				return delegate(LichhocEntity entity,LichhocEntity other)
				{
					return entity.dNgaytao.CompareTo(other.dNgaytao);
				};
			}
		}
		public static Comparison<LichhocEntity> COMPARISON_FK_iNguoicapnhat
		{
			get
			{
				return delegate(LichhocEntity entity,LichhocEntity other)
				{
					return entity.FK_iNguoicapnhat.CompareTo(other.FK_iNguoicapnhat);
				};
			}
		}
		public static Comparison<LichhocEntity> COMPARISON_dNgaycapnhat
		{
			get
			{
				return delegate(LichhocEntity entity,LichhocEntity other)
				{
					return entity.dNgaycapnhat.CompareTo(other.dNgaycapnhat);
				};
			}
		}
		public static Comparison<LichhocEntity> COMPARISON_dNgayhoc
		{
			get
			{
				return delegate(LichhocEntity entity,LichhocEntity other)
				{
					return entity.dNgayhoc.CompareTo(other.dNgayhoc);
				};
			}
		}
		public static Comparison<LichhocEntity> COMPARISON_dGiobatdau
		{
			get
			{
				return delegate(LichhocEntity entity,LichhocEntity other)
				{
					return entity.dGiobatdau.CompareTo(other.dGiobatdau);
				};
			}
		}
		public static Comparison<LichhocEntity> COMPARISON_dGioketthuc
		{
			get
			{
				return delegate(LichhocEntity entity,LichhocEntity other)
				{
					return entity.dGioketthuc.CompareTo(other.dGioketthuc);
				};
			}
		}
		public static Comparison<LichhocEntity> COMPARISON_sGhichu
		{
			get
			{
				return delegate(LichhocEntity entity,LichhocEntity other)
				{
					return entity.sGhichu.CompareTo(other.sGhichu);
				};
			}
		}
		public static Comparison<LichhocEntity> COMPARISON_iTrangthai
		{
			get
			{
				return delegate(LichhocEntity entity,LichhocEntity other)
				{
					return entity.iTrangthai.CompareTo(other.iTrangthai);
				};
			}
		}
        #endregion
    }
}
